package faceTest;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static void main2(String[] args) {
        ArrayList<Character> list = new ArrayList<>();
        String s1 = "welcome to bit";
        String s2 = "come";

        for (int i = 0; i < s1.length(); i++) {
             char ch = s1.charAt(i);
             //ch+"";
             if (!s2.contains(String.valueOf(ch))) {
                 list.add(ch);
             }
        }

        for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i));
        }
    }

    public static void main1(String[] args) {
        ArrayList<Character> list = new ArrayList<>();
        String s1 = "welcome to bit";
        for (int i = 0; i < s1.length(); i++) {
            list.add(s1.charAt(i));
        }
        String s2 = "come";
        for (int i = 0; i < list.size(); i++) {
            for (int j = 0; j < s2.length(); j++) {
                if (list.contains(s2.charAt(j))) {
                    list.remove((Character) s2.charAt(j));
                }

            }
        }
        
        for (int i = 0; i < list.size(); i++) {
             System.out.print(list.get(i));
        }
    }
}
